package com.zjzywl.smoke.controller;

import javax.servlet.http.HttpSession;

import com.zjzywl.smoke.config.AppConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class MainController {
	@Autowired
	private AppConfig appConfig;
	@RequestMapping(value = "/manage")
	public String main(Model model) {
		return "manage/manageSCLayout";
	}

	@RequestMapping(value = "/")
	public String index(Model model, HttpSession session) {
		model.addAttribute("auto", session.getAttribute("auto"));
		return "main/index";
	}


	// 摄像头
	@RequestMapping(value = "/index")
	public String index(Model model) {
		return "main/index";
	}

	// camera test
	@RequestMapping(value = "/test")
	public String test(Model model) {
		return "test/index";
	}

}
